package com.lefeng.cockpit.resource.storage;

import com.lefeng.cockpit.resource.storage.impl.HadoopUtils;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;


/**
 * choose the impl of storage by RESOURCE_STORAGE_TYPE
 */

@Component
@Configuration
public class StoreConfiguration {

    @Bean
    public StorageOperate storageOperate() {
        switch ("HDFS") {
            case "HDFS":
                return HadoopUtils.getInstance();
            default:
                return null;
        }
    }

}
